package com.qingsong.service;

import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;
import com.qingsong.dto.ArticleInsertDTO;
import com.qingsong.dto.ArticlePageDTO;
import com.qingsong.vo.ArticleSimpleListVO;
import com.qingsong.dto.ArticleUpdateDTO;
import com.qingsong.entity.Article;

import java.util.List;

/**
 * 新闻表 服务层。
 *
 * @author qingsong
 * @since 2024-12-22
 */
public interface ArticleService extends IService<Article> {

    boolean insert(ArticleInsertDTO dto);
    Article select(Long id);
    List<Article> list();

    List<Article> top(Long n);
    Page<Article> page(ArticlePageDTO dto);
    boolean update(ArticleUpdateDTO dto);
    boolean delete(Long id);
    boolean deleteBatch(List<Long> ids);

    List<ArticleSimpleListVO> simpleList();

}
